﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Text;
using OpenAuth.Repository.Domain;
using OpenAuth.Repository.Interface;

namespace OpenAuth.App
{
    public class CDRGH004App : ApiBaseApp<CDRGH004>
    {
        public CDRGH004App(IApiRepository<CDRGH004> repository) : base(repository)
        {
        }
        /// <summary>
        /// 当班出诊医生查询
        /// </summary>
        /// <param name="ksdm">科室代码</param>
        /// <returns></returns>
        public IEnumerable<CDRGH004> QueryCDRGH004ByKsdm(string ksdm)
        {
            List<SqlParameter> param = new List<SqlParameter>();
            param.Add(new SqlParameter("@Ksdm", ksdm));
            param.Add(new SqlParameter("@Czyh", "hf001"));
            var result = Query<CDRGH004>("exec usp_web_webtrans_CDRGH004 @ksdm=@Ksdm,@czyh=@Czyh", param);
            return result;
        }
    }
}
